<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">body{padding-top: 0;}</style>
</head>
<body>

<div class="container">
    <form id="list">
    	<input id="name" type="hidden" name="id" />
	   	<div class="panel-group" id="grouplist">
	   		<!--<div class="panel panel-default">
	   			<div class="panel-heading">
	   				<h4 class="panel-title">
	   					<input type="checkbox" />
	   					<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
							点击我进行展开，再次点击我进行折叠。第 1 部分
						</a>
	   				</h4>
	   			</div>
	   			<div id="collapseOne" class="panel-collapse collapse in">
					<div class="panel-body">
						
					</div>
				</div>
	   		</div>-->
	   	</div>
	   	<div class="text-right">
	   		<button type="button" class="btn btn-primary" id="btn-sub">保存编辑</button>
	   	</div>
    </form>
</div>


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/url.min.js"></script>
<script src="js/CryptoJS/rollups/md5.js"></script>
<script src="js/common.js"></script>
<script language="JavaScript">
    var id = $.url('?id');
    $("#name").val(id);
    var mylist = [];
    $.post(api_cfg.domain + "group_menu", {"id":id}, function(data){
    	if(data.err == 0){
    		mylist = data.body;    		
    	}
    });
    $(function(){
    	api.menuList();

    })
    $("#btn-sub").click(function(){
        $.post(api_cfg.domain + "set_menu",$("#list").serialize(), function(data){
        	if(data.err==0){
        		parent.reLoad();
        	}else{
        		msgErr("error");
        	}
        });
    });

</script>
</body>
</html>
